function findEauSum(nums,target) {
    result = [];
    for (i = 0;i < nums.length; i++) {
        for(j = i+1; j < nums.length; j++) {
            sum = nums[i] + nums[j];
            if(sum === target){
                result.push([i,j])
            }
        }
    }
    console.log(result[0]);
    console.log(result[1]);
    console.log(result[2]);
}


findEauSum([1,2,3,4,5,6,7,8],8);